package main

import (
	"github.com/hprose/hprose-go"
	"net/http"
)

type proxyStub struct {
	Hello func(string) []byte   `result:"RawWithEndTag"`
	Swap  func(int, int) []byte `result:"RawWithEndTag"`
	Sum   func(...int) []byte   `result:"RawWithEndTag"`
}

func main() {
	client := hprose.NewClient("http://127.0.0.1:8080/")
	var ro *proxyStub
	client.UseService(&ro)
	service := hprose.NewHttpService()
	service.AddMethods(ro, hprose.Raw)
	http.ListenAndServe(":8181", service)
}
